package com.wgchao.identityrightsmanagement.infrastructure.jpa.repository;

import com.wgchao.identityrightsmanagement.infrastructure.jpa.entity.SysBaseDepartmentOffice;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SysBaseDepartmentOfficeRepository extends JpaRepository<SysBaseDepartmentOffice, Long> {
    SysBaseDepartmentOffice findFirstByDepartmentCodeAndOfficeCode(String departmentCode, String officeCode);
    SysBaseDepartmentOffice findFirstByIdentify(String identify);
    List<SysBaseDepartmentOffice> findAllByDepartmentCode(String departmentCode);
    List<SysBaseDepartmentOffice> findAllByOfficeCode(String officeCode);
    void deleteAllByDepartmentCode(String departmentCode);
    void deleteAllByOfficeCode(String officeCode);
}
